Skip to main content

All Questions

3votes
1answer
974views

Extract index of first unique element in large array in Swift

I'm using the following code to return the first index of a unique character in a large String. It works fine until I get to large strings, where it times out. Is ...
Adrian's user avatar
2votes
1answer
8kviews

Remove Duplicates from Array in Swift 3.0

I ran the following code through a Leetcode.com challenge and it says the runtime for the test cases is 119ms, which puts it at the back of the pack performance wise. The goal is to remove duplicates ...
Adrian's user avatar

close